package cn.tk.repository.mr;

import cn.tk.model.entity.mr.Entity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by denglw on 2021/8/3.<br/>
 * Desc: 实体
 */
@Repository
public interface EntityDao extends JpaRepository<Entity, Long> {

    /**
     * 获取所有有效实体.<br/>
     * @return list
     */
    @Override
    @Query(value = "select * from mr_entity where deleted= 0 and disabled=0", nativeQuery = true)
    List<Entity> findAll();
}
